<?php


namespace app\lunwen\controller;


use app\lunwen\model\EducationalCheckBestModel;
use app\lunwen\model\ExternalMarkGradeModel;
use cmf\controller\HomeBaseController;

class EducationalToOutController extends  HomeBaseController
{
    public function index(){
        return $this->fetch(":educationalToOut");
    }

    //查看提交的文件
    public function seeFile(){
        $file = new EducationalCheckBestModel();
        $data = $file
            ->whereTime('create_time','>',session('beforeYear'))
            ->whereTime('create_time','<',session('afterYear'))
            ->all();
        $this->assign('title',$data);
        return $this->fetch(":educationalSeeFile");
    }

    //查看评分
    public function checkGrade(){
        $grade = new ExternalMarkGradeModel();
        $data = $grade ->whereTime('create_time','>',session('beforeYear'))
            ->whereTime('create_time','<',session('afterYear'))
            ->all();
        $this->assign('title',$data);
        return $this->fetch(":educationalCheckGrade");
    }
}